export const constantRoute = [
    {
        path: '/',
        redirect: '/guide'
    },
    {
        path: '/layout',
        name: 'Layout',
        redirect: '/subject',
        component: () => import('@/layout/index.vue'),
        children: [
            {
                path: '/subject',
                name: 'Subject',
                component: () => import('@/views/Subject/index.vue'),
                meta: {
                    title: '刷题',
                    path: '/subject',
                    hidden: true
                }
            },
            {
                path: '/subjectDetail',
                name: 'SubjectDetail',
                component: () => import('@/views/Subject/SubjectDetail/index.vue'),
                meta: {
                    title: '题目详情',
                    hidden: false
                }
            },
            {
                path: '/upload-subject',
                name: 'UploadSubject',
                component: () => import('@/components/UploadSubject.vue'),
                meta: {
                    title: '题目录入',
                    path: '/upload-subject',
                    hidden: false
                }
            },
            {
                path: '/practice',
                name: 'Practice',
                component: () => import('@/views/Practice/index.vue'),
                meta: {
                    title: '练题',
                    hidden: false
                }
            },
            {
                path: '/resource',
                name: 'Resource',
                component: () => import('@/views/Resource/index.vue'),
                meta: {
                    title: '资源',
                    path: '/resource',
                    hidden: true
                }
            },
            {
                path: '/upload-resource-doc',
                name: 'UploadResourceDoc',
                component: () => import('@/components/UploadResourceDoc.vue'),
                meta: {
                    title: '资源文档录入',
                    path: '/upload-resource-doc',
                    hidden: false
                }
            },
            {
                path: '/article',
                name: 'Article',
                component: () => import('@/views/Article/index.vue'),
                meta: {
                    title: '文章',
                    path: '/article',
                    hidden: true
                }
            },
            {
                path: '/upload-article',
                name: 'UploadArticle',
                component: () => import('@/components/UploadArticle.vue'),
                meta: {
                    title: '文章发布',
                    path: '/upload-article',
                    hidden: false
                }
            },
            {
                path: '/article-detail',
                name: 'ArticleDetail',
                component: () => import('@/views/Article/ArticleDetail/index.vue'),
                meta: {
                    title: '文章详情',
                    path: '/article-detail',
                    hidden: false
                }
            },
            {
                path: '/chatgpt',
                name: 'Chatgpt',
                component: () => import('@/views/AIGC/ChatGPT.vue'),
                meta: {
                    title: 'ChatGPT',
                    path: '/chatgpt',
                    hidden: true
                }
            },

        ]
    },
    {
        path: '/personal',
        name: 'Personal',
        redirect: '/personalInfo',
        component: () => import('@/views/Personal/index.vue'),
        children: [
            {
                path: '/personalInfo',
                name: 'PersonalInfo',
                component: () => import('@/views/Personal/PersonalInfo/index.vue'),
                meta: {
                    title: '个人信息',
                    path: '/personalInfo',
                    icon: 'UserFilled',
                    hidden: true
                }
            },
            {
                path: '/personalCollection',
                name: 'PersonalCollection',
                component: () => import('@/views/Personal/PersonalCollection/index.vue'),
                meta: {
                    title: '收藏夹',
                    path: '/personalCollection',
                    icon: 'StarFilled',
                    hidden: false
                }
            },
            {
                path: '/sm',
                name: 'Sm',
                meta: {
                    title: '刷题管理',
                    icon: 'Promotion',
                    hidden: true
                },
                redirect: '/subjectManagement',
                children: [
                    {
                        path: '/subjectManagement',
                        name: 'SubjectManagement',
                        component: () => import('@/views/Personal/Management/Subject/SubjectManagement/index.vue'),
                        meta: {
                            title: '题目管理',
                            permission: ['subject:add', 'subject:update'], // 有该权限时，才显示改路由
                            icon: 'Platform',
                            hidden: true
                        },
                    },
                    {
                        path: '/categoryManagement',
                        name: 'CategoryManagement',
                        component: () => import('@/views/Personal/Management/Subject/CategoryManagement/index.vue'),
                        meta: {
                            title: '分类管理',
                            permission: ['subject:add', 'subject:update'], // 有该权限时，才显示改路由
                            icon: 'Grid',
                            hidden: true
                        }
                    },
                ]
            },
            {
                path: '/am',
                name: 'Am',
                meta: {
                    title: '文章管理',
                    icon: 'List',
                    hidden: true
                },
                redirect: '/contentManagement',
                children: [
                    {
                        path: '/contentManagement',
                        name: 'ContentManagement',
                        component: () => import('@/views/Personal/Management/Article/ContentManagement/index.vue'),
                        meta: {
                            title: '内容管理',
                            icon: 'ChromeFilled',
                            permission: ['article'],
                            hidden: true
                        },
                    },
                    {
                        path: '/commentManagement',
                        name: 'CommentManagement',
                        component: () => import('@/views/Personal/Management/Article/CommentManagement/index.vue'),
                        meta: {
                            title: '评论管理',
                            permission: ['article'],
                            icon: 'Comment',
                            hidden: true
                        }
                    },
                ]
            },
            {
                path: '/rm',
                name: 'Rm',
                meta: {
                    title: '资源管理',
                    icon: 'List',
                    hidden: true
                },
                redirect: '/resourceManagement',
                children: [
                    {
                        path: '/resourceManagement',
                        name: 'ResourceManagement',
                        component: () => import('@/views/Personal/Management/Resource/ResourceManagement/index.vue'),
                        meta: {
                            title: '内容管理',
                            icon: 'Histogram',
                            permission: ['resource:add', 'resource:update'],
                            hidden: true
                        },
                    },
                    {
                        path: '/resourceClassifyManagement',
                        name: 'ResourceClassifyManagement',
                        component: () => import('@/views/Personal/Management/Resource/ResourceClassifyManagement/index.vue'),
                        meta: {
                            title: '类别管理',
                            permission: ['resource:add', 'resource:update'],
                            icon: 'Histogram',
                            hidden: true
                        },
                    },
                ]
            },
            {
                path: '/personalStatistic',
                name: 'PersonalStatistic',
                component: () => import('@/views/Personal/PersonalStatistic/index.vue'),
                meta: {
                    title: '数据',
                    path: '/personalStatistic',
                    icon: 'TrendCharts',
                    hidden: false
                }
            }
        ]
    },
    {
        path: '/guide',
        name: 'Guide',
        component: () => import('@/views/Guide/index.vue'),
        meta: {
            title: '引导页'
        }
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/views/Login/index.vue'),
        meta: {
            title: '登录页'
        }
    },

]